package seta.minecredit;

import org.bukkit.ChatColor;
import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.event.player.PlayerListener;

public class xPlayerListener extends PlayerListener {
	
	Files Filer;
	
	xPlayerListener(Files filer){
		Filer = filer;
	}
	
	public void onPlayerChat(PlayerChatEvent event){
		if(Filer.playerBad(event.getPlayer().getName())){
			if(Filer.getConfKey("bad_grayout").equals("true")){
				event.setMessage(ChatColor.GRAY+event.getMessage());
			}
			if(Filer.getConfKey("bad_onfire").equals("true")){
				event.getPlayer().setFireTicks(20);
			}
		}
	}
}
